package com.nhncorp.pleiades.util;

public class StopWatch {
  
  private long start;
  private final Object timeMonitor;
  
  public StopWatch() {
    timeMonitor = new Object();
    start = System.currentTimeMillis();
  }
  
  public void reset () {
    synchronized(timeMonitor) {
      start = System.currentTimeMillis();  
    }
  }
  
  public long elapsedTime() {
    synchronized(timeMonitor) {
      long now = System.currentTimeMillis();
      return (now - start);
    }
  }
}
